package admin

import (
	"OrgManager/library/response"
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/os/glog"

	"github.com/gogf/gf/net/ghttp"
)

type Controller struct {
}

func init() {
	var c = &Controller{} // 用户模块 路由注册 - 使用执行对象注册方式
	group := g.Server().Group("/admin/user")
	group.ALL("/index.bu", c.Index)
	group.ALL("/1/2/a/index_test.bu", c.IndexTest)
}

func (c *Controller) Index(r *ghttp.Request) {
	r.Session.Set("orgMember", "AAA")
	response.Json(r, 0, "index", nil)
}

func (c *Controller) IndexTest(r *ghttp.Request) {
	glog.Infof("xxxxxxxxxxxxxxxxxx \r\n ")
	values := g.Map{}
	values["haha"] = "李老不"
	values["ceshi"] = false
	response.Html(r, "user/index.html", values)
}
